package co.yixiang.modules.shop.service.impl;

import co.yixiang.modules.shop.entity.AppVersion;
import co.yixiang.modules.shop.mapper.AppVersionMapper;
import co.yixiang.modules.shop.service.AppVersionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author hisen
 * @date 2018-12-13
 */
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class AppVersionServiceImpl implements AppVersionService {
    @Autowired
    private AppVersionMapper appVersionMapper;

    @Override
    public List<AppVersion> findVersion(int type){
        QueryWrapper<AppVersion> wrapper = new QueryWrapper<>();
        wrapper.eq("type",type);
        return appVersionMapper.selectList(wrapper);
    }


}
